/*
 * common.h
 *
 *  Created on: 2011-03-22
 *      Author: kamil
 */

#ifndef COMMON_H_
#define COMMON_H_

/**
 * Referee data packet struct
 */
struct GameStatePacket {
	char cmd; 						// current referee command
	unsigned char cmd_counter; 		// increments each time new command is set
	unsigned char goals_blue; 		// current score for blue team
	unsigned char goals_yellow; 	// current score for yellow team
	unsigned short time_remaining; 	// seconds remaining for current game stage (network byte order)
};

class Cmd{
public:
	static const char HALT = 'H';
	static const char STOP = 'S';
	static const char READY = ' ';
	static const char START = 's';

	static const char BEGIN_FIRST_HALF = '1';
	static const char BEGIN_HALF_TIME = 'h';
	static const char BEGIN_SECOND_HALF = '2';
	static const char BEGIN_OVERTIME_HALF_1 = 'o';
	static const char BEGIN_OVERTIME_HALF_2 = 'O';
	static const char BEGIN_PENALTY_SHOOTOUT = 'a';

	static const char KICKOFF_Y = 'k';
	static const char KICKOFF_B = 'K';
	static const char PENALTY_Y = 'p';
	static const char PENALTY_B = 'P';
	static const char DIRECT_Y  = 'f';
	static const char DIRECT_B  = 'F';
	static const char INDIRECT_Y = 'i';
	static const char INDIRECT_B = 'I';

	static const char TIMEOUT_Y = 't';
	static const char TIMEOUT_B = 'T';
	static const char TIMEOUT_END_Y = 'z';
	static const char TIMEOUT_END_B = 'Z';
	static const char GOAL_Y = 'g';
	static const char GOAL_B = 'G';
	static const char DECREASE_GOAL_Y = 'd';
	static const char DECREASE_GOAL_B = 'D';
	static const char YELLOW_CARD_Y = 'y';
	static const char YELLOW_CARD_B = 'Y';
	static const char RED_CARD_Y = 'r';
	static const char RED_CARD_B = 'R';

	static const char CANCEL = 'c';
};


#endif /* COMMON_H_ */
